<template>
	<view class="container">
		<navBar title="组件模板" :isBack="false"></navBar>
		<view class="wrap">
            123
		</view>
		<!-- 自定义tabbar -->
		<tabBar :address="1"></tabBar>
	</view>
</template>

<script>
	import waterFall from '../../components/waterFall/waterFall.vue'
	export default {
		components: {
			waterFall
		},
		data() {
			return {
				templates: [{
					name: '文章模块',
					url: '/articleModules/article/articleList',
					color:'#f47920'
				}, {
					name: '树级选择页面',
					url: '/articleModules/example/treeSelect',
					color:'#2a5caa'
				}, {
					name: '消息模块',
					url: '/articleModules/message/msgList',
					color:'#1d953f'
				}],
				components: [{
					name: '海报组件',
					url: '/articleModules/example/poster',
					color:'#d3c6a6'
				}, {
					name: '图片文件上传',
					url: '/articleModules/example/upload',
					color:'#6e6b41'
				}, {
					name: '微信分享',
					url: '/articleModules/example/share',
					color:'#007947'
				}, {
					name: '瀑布流布局',
					url: '/articleModules/example/waterfall',
					color:'#8552a1'
				}, {
					name: '二维码生成器',
					url: '/articleModules/example/qrcode',
					color:'#c63c26'
				}],
				result: ''
			}
		},
		onShow(options) {
			// this.getData()
			if (this.result) {
				uni.showModal({
					title: '提示',
					content: JSON.stringify(this.result),
					success: () => {
						this.result = ''
					}
				})
			}
		},
		methods: {
			navTo(url) {
				uni.navigateTo({
					url: url
				})
			}
		},
	}
</script>

<style lang="scss" scoped>
	.flex {
		display: flex;
		align-items: center;
	}

	.container {
		width: 100%;
	}

	.wrap {
		width: 100%;
		height: 100%;
		position: relative;
		overflow-y: scroll;

		>image {
			width: 100%;
		}

		.content {
			position: absolute;
			width: 100%;
			height: 100%;
			top: 0;
			left: 0;
		}

		.title {
			width: 90%;
			margin: 30rpx auto 0;
			background: rgba(255, 255, 255, 0.5);
			box-shadow: 0 0 10rpx 5rpx #eee;
			font-weight: bold;
			color: $uni-color-theme;
			font-size: 30rpx;
			border-radius: 10rpx;
			padding: 25rpx;

			image {
				width: 40rpx;
				margin-right: 20rpx;
			}
		}
		
		.lists{
			width: 90%;
			margin: 30rpx auto 0;
			background: rgba(255, 255, 255, 0.5);
			box-shadow: 0 0 10rpx 5rpx #eee;
			padding: 25rpx;
			flex-wrap: wrap;
			justify-content: space-between;
			.item{
				width: 48%;
				border-radius: 10rpx;
				margin-bottom: 25rpx;
				height:150rpx;
				position: relative;
				>image{
					width: 100%;
					position: absolute;
					bottom:0;
					left: 0;
				}
				.item-c{
					width: 100%;
					height: 100%;
					padding: 25rpx;
					display: flex;
					align-items: center;
					justify-content: space-between;
					text{
						color: #fff;
						font-size: 28rpx;
						font-weight: bold;
						font-style: italic;
					}
				}
			}
		}
	}
</style>